package com.pm.business.service.impl;

import java.util.List;
import com.pm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pm.business.mapper.EnterpriseAwardMapper;
import com.pm.business.domain.EnterpriseAward;
import com.pm.business.service.IEnterpriseAwardService;

/**
 * 企业获奖Service业务层处理
 * 
 * @author zxl
 * @date 2022-05-07
 */
@Service
public class EnterpriseAwardServiceImpl implements IEnterpriseAwardService 
{
    @Autowired
    private EnterpriseAwardMapper enterpriseAwardMapper;

    /**
     * 查询企业获奖
     * 
     * @param awardId 企业获奖主键
     * @return 企业获奖
     */
    @Override
    public EnterpriseAward selectEnterpriseAwardByAwardId(Long awardId)
    {
        return enterpriseAwardMapper.selectEnterpriseAwardByAwardId(awardId);
    }

    /**
     * 查询企业获奖列表
     * 
     * @param enterpriseAward 企业获奖
     * @return 企业获奖
     */
    @Override
    public List<EnterpriseAward> selectEnterpriseAwardList(EnterpriseAward enterpriseAward)
    {
        return enterpriseAwardMapper.selectEnterpriseAwardList(enterpriseAward);
    }

    /**
     * 新增企业获奖
     * 
     * @param enterpriseAward 企业获奖
     * @return 结果
     */
    @Override
    public int insertEnterpriseAward(EnterpriseAward enterpriseAward)
    {
        enterpriseAward.setCreateTime(DateUtils.getNowDate());
        return enterpriseAwardMapper.insertEnterpriseAward(enterpriseAward);
    }

    /**
     * 修改企业获奖
     * 
     * @param enterpriseAward 企业获奖
     * @return 结果
     */
    @Override
    public int updateEnterpriseAward(EnterpriseAward enterpriseAward)
    {
        return enterpriseAwardMapper.updateEnterpriseAward(enterpriseAward);
    }

    /**
     * 批量删除企业获奖
     * 
     * @param awardIds 需要删除的企业获奖主键
     * @return 结果
     */
    @Override
    public int deleteEnterpriseAwardByAwardIds(Long[] awardIds)
    {
        return enterpriseAwardMapper.deleteEnterpriseAwardByAwardIds(awardIds);
    }

    /**
     * 删除企业获奖信息
     * 
     * @param awardId 企业获奖主键
     * @return 结果
     */
    @Override
    public int deleteEnterpriseAwardByAwardId(Long awardId)
    {
        return enterpriseAwardMapper.deleteEnterpriseAwardByAwardId(awardId);
    }
}
